Repository navigation
[0.4.x] lv-tool: Debounce resize requests (fixes #161) - #249
Conversation
| Time operator-(Time const& other) const { | ||
| return Time(this->m_moment - other.m_moment); | ||
| } | ||
|
|
There was a problem hiding this comment.
What was the reason to implement the subtraction operator as a member function? The implementation in master uses a free function, following the practice of the C++ standard library.
There was a problem hiding this comment.
@kaixiong no particular reason, changed now as suggested.
| return false; | ||
| } | ||
| const double seconds_passed = (LV::Time::now() - m_received_at).to_usecs() / 1000.0 / 1000.0; | ||
| return seconds_passed >= 0.2; // >=300ms is known to feel slow to humans |
There was a problem hiding this comment.
It would be better to backport LV::Time::to_secs() and use that instead.
634792b to
bf0abd1
Compare
kaixiong
left a comment
There was a problem hiding this comment.
There are a few formatting inconsistencies against lv-tool in master which I think could be resolved to ease porting between the branches. Another enhancement to consider is having a configurable debounce period.
Other than the above, I think the implementation looks good and could be merged first.
Fixes #161
Started out at hartwork/sdl_video_demo#10